package com.syni.mdd.yhd.common.all.quartz.groupMessage;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.JobListener;
import org.springframework.stereotype.Component;

/**
 * @className OpTestJobListener
 * @description TOO
 * @Author cfx
 * @DATE 2019/9/2 18:44
 * @VERSION 1.0
 **/
//@Component
public class OpTestJobListener implements JobListener {
    private Integer id;
    public OpTestJobListener(){

    }
    public OpTestJobListener(Integer id){
        this.id = id;
    }
    @Override
    public String getName() {
        return getClass().getName() + "_" + this.id;
    }

    @Override
    public void jobToBeExecuted(JobExecutionContext jobExecutionContext) {

    }

    @Override
    public void jobExecutionVetoed(JobExecutionContext jobExecutionContext) {

    }

    @Override
    public void jobWasExecuted(JobExecutionContext jobExecutionContext, JobExecutionException e) {
        System.out.println("任务： "+ jobExecutionContext.getJobDetail().getKey().getName());
        System.out.println("完成回调");
    }
}
